const login = () => {
    return new Promise((resolve, reject) => {
        uni.login({
            success(res) {
                resolve(res)
            },
            fail(err) {
                reject(err)
            }
        })
    })
}

const toast = (title, icon = 'none') => {
    uni.showToast({
        title: title,
        icon: icon
    })
}

export default {
  login,
  toast
}